package algorithm.entity;

import android.support.annotation.NonNull;

import com.mapbox.mapboxsdk.annotations.Marker;

import java.util.List;

import algorithm.douglas.Douglas;

/**
 * Created by apple on 2017/6/1.
 */

public class MarkerDouglas extends Douglas<Marker> {

    public MarkerDouglas(@NonNull List<Marker> list) {
        super(list);
    }

    public MarkerDouglas(@NonNull List<Marker> list, double threshold) {
        super(list, threshold);
    }

    @Override
    protected double getX(Marker marker) {
        try {
            return marker.getPosition().getLongitude();
        } catch (Exception e) {

        }
        return 0;
    }

    @Override
    protected double getY(Marker marker) {
        try {
            return marker.getPosition().getLatitude();
        } catch (Exception e) {

        }
        return 0;
    }

}
